﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using IterationLife.Domains.Sports.Services;
using IterationLife.Football.MTSports.Contracts.Sports;
using Util;

namespace IterationLife.DataService.ApiServices.Controllers
{
    public class MTSportsController : Controller
    {
        /// <summary>
        /// 运动控制器
        /// </summary>
        public MTSportsController(ISportUserService sportUserService, IDataImportService dataImportService)
        {
            SportUserService = sportUserService;
            DataImportService = dataImportService;
        }

        public ISportUserService SportUserService { get; set; }

        public IDataImportService DataImportService { get; set; }

        public ActionResult Login(string userName, string password)
        {
            //SportUserService.Login("18530840044", "haiqing");
            //SportUserService.Login("13311306750", "111111");
            //SportUserService.Login("18780139447", "wlcyd123456");
            SportUserService.Login("leilei55780", "123456");
            return PartialView("Login");
        }

        /// <summary>
        /// 同步
        /// </summary>
        public string Synchronization()
        {
            DataImportService.Import();
            return "1";
        }
    }
}